﻿// var commonUrl ="http://10.190.3.6:8080/";
var commonUrl ="/";
var common = {
    http:function(url,method,params,fn){
         var part = commonUrl+url;
         $.ajax({
               url:part,
               type:method,
               data:params,
               dataType:'json',
               success:function(data){
                    fn(data)
               },
               complete:function(XMLHttpRequest,status){
                        if (XMLHttpRequest.status==403){
                           
                        }
                        if(status=='error'){
                          
                        }
                        if(status=='timeout'){
                          
                        }
                }

         })
    },
    //传输率
    monthtransfer:function(params,fn){
        this.http("monthtransfer/findall","get",params,fn) 
    },
    //有效天数
    monthvalidate:function(params,fn){
        this.http("monthvalidate/findall","get",params,fn) 
    },
    //扣分表
    monthdeduct:function(params,fn){
        this.http("monthdeduct/findall","get",params,fn)
    },
    //运行单位质量评估
    monthunitworking:function(params,fn){
        this.http("monthrununitworking/findall","get",params,fn)
    },
    //运行单位日常工作月评价表
    monthRunUnitQC:function(params,fn){
        this.http("monthRunUnitQC/findall","get",params,fn)
    },
    //考核结果
    calscorce:function(params,fn){
        this.http("calscorce/findall","get",params,fn)
    },
    //新增获取站点
    getallstation:function (params,fn) {
        this.http("sendqureydata/getallstation","get",params,fn)
    },
    //获取检查人名单
    getcheckperson:function (params,fn) {
        this.http("sendqureydata/getcheckperson","get",params,fn)
    },
    //扣分表新增保存
    savedeductscore:function (params,fn) {
        this.http("monthdeduct/savedeductscore","get",params,fn)
    },
    //运行单位
    getrununit:function (params,fn) {
        this.http("sendqureydata/getrununit","get",params,fn)
    },
    //站点区域
    getcity:function (params,fn) {
        this.http("sendqureydata/getcity","get",params,fn)
    },
    //站点类型
    getstationtype:function (params,fn) {
        this.http("sendqureydata/getstationtype","get",params,fn)
    },
    //查询条件站点
    getstationmsg:function (params,fn) {
        this.http("sendqureydata/getstationmsg","get",params,fn)
    },
    //多条件查询传输率
    monthtransferConditions:function (params,fn) {
        this.http("monthtransfer/findByConditions","get",params,fn)
    },
    //多条件查询有效天数
    monthvalidateConditions:function (params,fn) {
        this.http("monthvalidate/findByConditions","get",params,fn)
    },
    //多条件查询日常工作
    monthrununitworkingConditions:function (params,fn) {
        this.http("monthrununitworking/findByConditions","get",params,fn)
    },
    //多条件查询质检扣分
    monthdeductConditions:function (params,fn) {
        this.http("monthdeduct/findByConditions","get",params,fn)
    },
    //多条件查询运行单位运行质量评估
    monthRunUnitQCConditions:function (params,fn) {
        this.http("monthRunUnitQC/findByConditions","get",params,fn)
    },
    //多条件查询得分
    calscorceConditions:function (params,fn) {
        this.http("calscorce/findByConditions","get",params,fn)
    },
    //查询所有扣分
    findByDetail:function (params,fn) {
        this.http("monthdeduct/findByDetail","get",params,fn)
    },
    //点击运行单位
    getrununitCode:function (params,fn) {
        this.http("sendqureydata/getrununit","get",params,fn)
    },
    //点击城市
    getcityCode:function (params,fn) {
      this.http("sendqureydata/getcity","get",params,fn)
    },
    //点击站点类型
    getstationtypeCode:function (params,fn) {
      this.http("sendqureydata/getstationtype","get",params,fn)
    },
    //删除扣分表
    deletedeductscore:function (params,fn) {
        this.http("monthdeduct/deletedeductscore","get",params,fn)
    },
    
    
    
//  ============================================================================
	//站点类型
	stationtype:function(params,fn){
		this.http("sendqureydata/getstationtype","get",params,fn)
	},
//	运行单位
	rununit:function(params,fn){
		this.http("sendqureydata/getrununit","get",params,fn)
	},
	//城市列表
	citylist:function(params,fn){
		this.http("sendqureydata/getstationmsgs","get",params,fn)
	},
//	传输率
	transmission:function(params,fn){
		this.http("monthtransfer/findByConditions","get",params,fn)
	},
//	有效天数
	workday:function(params,fn){
		this.http("monthvalidate/findByConditions","get",params,fn)
	},
//	运行质量得分
	qualityscore:function(params,fn){
		this.http('calscorce/findByConditions',"get",params,fn)
	},
//运行单位运行质量
	runquality:function(params,fn){
		this.http('runcost/findByConditions',"get",params,fn)
	},
//	日常评估表
	daytest:function(params,fn){
		this.http('monthRunUnitQC/findByConditions',"get",params,fn)
	},
//	运行单位质量体系
	qualityunit:function(params,fn){
		this.http('monthrununitworking/findByConditions',"get",params,fn)
	},
//	扣分
	losepoint:function(params,fn){
		this.http('monthdeduct/findByConditions',"get",params,fn)
	},
};
